var express = require('express')
    // var bodyParser = require('body-parser')

// const localPort = 3000;
var app = express()
var routerd = require("./router/foodtext");
app.use("/public", express.static("public"));
// app.use(bodyParser.urlencoded({ extended: false }));
// app.use(bodyParser.json());
// app.post('/list', function(req, res) {

//     // 输出 JSON 格式
//     var response = {
//         "first_name": req.query.one_name,
//         "last_name": req.query.two_name
//     };
//     console.log(response);
//     res.send({ err: -1, text: 000 });
// })
app.use("/food", routerd);
app.listen(8081, () => {
    var home = hostname = 'http://192.168.0.102';
    console.log("应用实例，访问地址为  " + home + ":" + 8081);
})